﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body class="ihg-theme-draft">

  <%@ include file="/WEB-INF/include/header.jsp"%>
  <%@ include file="/WEB-INF/include/submenu.jsp"%>

  <div class="container-fluid ihg-container has-ihg-sidemenu">

    <div class="ihg-breadcrumb">
      <ol class="breadcrumb border-breadcrumb">
        <li class="active">Email Template</li>
      </ol>
    </div>

    <div class="ihg-content-layout has-operation">

      <table class="table table-striped ihg-table tab-pane">
      
        <thead>
          <tr>
            <th style="text-align: left;">TITLE</th>
            <th>DESCRIPTION</th>
            <th>RECEIVER</th>
            <th class="text-center">OPT</th>
          </tr>
        </thead>
        
        <tbody>
          <c:forEach items="${emailTemplates}" var="emailTemplate">
            <tr>
              <td style="text-align: left; width: 15%;">${emailTemplate.title}</td>
              <td>${emailTemplate.description}</td>
              <td class="text-center">${emailTemplate.receiver.toString()}</td>
              <td class="text-center"><a href="${ctx.host}/email-templates/${emailTemplate.id}/edit" data-target="#edit" data-toggle="modal">Edit</a>&nbsp;&nbsp;</td>
            </tr>
          </c:forEach>
        </tbody>
        
      </table>

    </div>

  </div>

  <%@ include file="/WEB-INF/include/footer.jsp"%>
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource root="${ctx.resource}/build" type="script" src="js/page/settings/email-template/email-template-list.js" />
  <script type="text/javascript">
    require([ 'page/settings/email-template/email-template-list' ], function ( page ) {
      page.init();
    })
  </script>
</body>

</html>
